﻿<Page
    x:Class="LinkLine.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:LinkLine"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="#00b2f0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="600"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="600"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock Text="Link Lines" Grid.Column="1" Grid.Row="0" 
                   FontSize="48" HorizontalAlignment="Center" Foreground="White"/>
        <Grid Name="gridCanvas" Width="600" Height="600" 
              Canvas.ZIndex="1" Grid.Column="1" Grid.Row="1" Background="#FFF5E9E9"/>
        <Grid Grid.Column="0" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Button Name="btnStart" Content="Start" Click="btnStart_Click" Grid.Column="1" Grid.Row="0" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Top" Width="150"/>
            <Grid Grid.Row="2">

                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <Ellipse Grid.Column="1" Name="ellipse1" Width="60" Height="60"/>
                    <Ellipse Grid.Column="2" Name="ellipse2" Width="60" Height="60"/>
                    <Ellipse Grid.Column="3" Name="ellipse3" Width="60" Height="60"/>
                </StackPanel>
            </Grid>
            <StackPanel Name="stackPanelRanking" Grid.Row="4" HorizontalAlignment="Center">
            </StackPanel>
        </Grid>
        <Grid Grid.Column="2" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="2*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Name="txtScore" Text="Score: 0" Grid.Column="1" FontFamily="Segoe UI" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Top" />
            <Rectangle Name="rectScore" Fill="BlueViolet" Grid.Column="1" Grid.Row="1" Height="0" VerticalAlignment="Bottom" Margin="5,0"/>
        </Grid>
        <Popup x:Name="GameOverPopup" HorizontalOffset="200" VerticalOffset="200" Grid.Column="1" Grid.Row="1">
            <Border BorderBrush="{StaticResource ApplicationForegroundThemeBrush}" BorderThickness="2" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Width="200" Height="200">
                <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                    <TextBlock Text="Game Over" FontSize="24.667" HorizontalAlignment="Center" />
                    <Button Name="btnGameOverClose" Content="Close" Click="btnGameOverClose_Click" HorizontalAlignment="Center" />
                </StackPanel>
            </Border>
        </Popup>
        <Popup x:Name="CreateRecordPopup" HorizontalOffset="50" VerticalOffset="50" Grid.Column="1" Grid.Row="1">
            <Border BorderBrush="{StaticResource ApplicationForegroundThemeBrush}" BorderThickness="2" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Width="500" Height="300">
                <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                    <TextBlock Text="Congratulations! You created a record!" FontSize="24.667" HorizontalAlignment="Center" />
                    <TextBlock Text="Please enter your name:" FontSize="24.667" HorizontalAlignment="Center" />
                    <TextBox Name="txtPlayerName" FontSize="24.667" Width="300" HorizontalAlignment="Center"/>
                    <Button Name="btnCreateRecordOK" Content="OK" HorizontalAlignment="Center" Click="btnCreateRecordOK_Click" />
                </StackPanel>
            </Border>
        </Popup>
    </Grid>
</Page>
